home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Examples / Draw / Include / TextShp.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  2.6 KB  |  111 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                TextShp.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //
  8. //    Copyright:    © 1993, 1995 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef TEXTSHP_H
  13. #define TEXTSHP_H
  14.  
  15. #ifndef CONSTANT_H
  16. #include "Constant.h"
  17. #endif
  18.  
  19. #ifndef BASESHP_H
  20. #include "BaseShp.h"
  21. #endif
  22.  
  23. #ifndef BOUNDSHP_H
  24. #include "BoundShp.h"
  25. #endif
  26.  
  27. // ----- Framework Layer -----
  28.  
  29. #ifndef FWSELECT_H
  30. #include "FWSelect.h"
  31. #endif
  32.  
  33. // ----- OS Layer -----
  34.  
  35. #ifndef FWINK_H
  36. #include "FWInk.h"
  37. #endif
  38.  
  39. #ifndef FWSTYLE_H
  40. #include "FWStyle.h"
  41. #endif
  42.  
  43. #ifndef FWPOINT_H
  44. #include "FWPoint.h"
  45. #endif
  46.  
  47. #ifndef FWRECT_H
  48. #include "FWRect.h"
  49. #endif
  50.  
  51. // ----- Foundation Layer -----
  52.  
  53. #ifndef FWRUNTYP_H
  54. #include "FWRunTyp.h"
  55. #endif
  56.  
  57. //========================================================================================
  58. // Forward Declarations
  59. //========================================================================================
  60.  
  61. /*#if FW_LIB_EXPORT_PRAGMAS
  62. #pragma import on
  63. #endif
  64. class FW_CLASS_ATTR ODFacet;
  65. class FW_CLASS_ATTR ODShape;
  66. class FW_CLASS_ATTR CDrawPart;
  67. class FW_CLASS_ATTR CDrawPublishLink;
  68. class FW_CLASS_ATTR CDrawSubscribeLink;
  69. class FW_CLASS_ATTR FW_CGraphicContext;
  70. class FW_CLASS_ATTR FW_CMouseEvent;
  71. class FW_CLASS_ATTR FW_CRectShape;
  72. #if FW_LIB_EXPORT_PRAGMAS
  73. #pragma import off
  74. #endif*/
  75.  
  76. class FW_CLASS_ATTR CDrawFacetClipper;
  77.  
  78. //========================================================================================
  79. // class CTextShape
  80. //========================================================================================
  81.  
  82. class FW_CLASS_ATTR CTextShape : public CBoundedShape
  83. {
  84. public:
  85.     FW_DECLARE_CLASS
  86.  
  87. public:
  88.     CTextShape();
  89.     CTextShape(FW_CReadableStream& archive);
  90.     virtual ~CTextShape();
  91.                 
  92.     // ----- Archiving -----
  93.     static void*         Read(FW_CReadableStream& archive);
  94.     virtual void        Flatten(FW_CWritableStream& archive);
  95.     
  96.     // ----- Shape -----
  97.     virtual void        GetClipRegion(Environment* ev, ODShape* clipRegion);
  98.     virtual ODShape*    CreateShapeOutline(Environment *ev);
  99.     
  100.     virtual FW_Boolean    HitTest(Environment *ev, FW_CGraphicContext& gc, const FW_CMouseEvent& theMouseEvent) const;
  101.     virtual void        RenderShape(Environment* ev, ODFacet* facet, FW_CGraphicContext& gc);
  102.  
  103. protected:
  104.     CTextShape(unsigned short shapeType, unsigned short renderVerb);
  105.  
  106. private:
  107.     virtual void         OutlineShape(FW_CGraphicContext& gc, const FW_PInk& ink, const FW_PStyle& style, const FW_CRect& rect);
  108.     FW_CDynamicString    fText;
  109. };
  110.  
  111. #endif